Surface generator fix for diffusion#4061
Open
dkachuma wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes surface generation behavior when diffusion is enabled and improves robustness of rupture-rate calculations when simulations use negative start times.
Changes:
- Initialize diffusion state for fracture subregions during
SurfaceGenerator::solverStepby retrieving the diffusion constitutive model and callinginitializeTemperatureState. - Replace a relative rupture-time tolerance check with an absolute
timeToleranceto avoid divide-by-zero/invalid comparisons for negative rupture times. - Move
DiffusionBase::initializeTemperatureStatefrom an inline no-op to a real implementation, and add aConstantDiffusionoverride to initialize diffusivity state.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp |
Initializes diffusion state for fracture subregions and uses an absolute time tolerance in rupture-rate computation. |
src/coreComponents/constitutive/diffusion/DiffusionBase.hpp |
Changes initializeTemperatureState from inline no-op to out-of-line virtual API. |
src/coreComponents/constitutive/diffusion/DiffusionBase.cpp |
Implements DiffusionBase::initializeTemperatureState to initialize phase diffusivity multipliers. |
src/coreComponents/constitutive/diffusion/ConstantDiffusion.hpp |
Declares an override for initializeTemperatureState. |
src/coreComponents/constitutive/diffusion/ConstantDiffusion.cpp |
Implements the override to initialize constant diffusivity values (and base multipliers). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for the surface generator
timeTolerance(1.0e-14) during rupture rate calculations, which prevents calculation errors or exceptions when a simulation uses negative start times.SurfaceGenerator::solverStepto retrieve the diffusion model and explicitly callinitializeTemperatureStatefor the fracture subregions, ensuring properties like diffusivity and phase multipliers are correctly set up.